import { getToken, setToken } from '@/utils/storage'
export default {
  namespaced: true,
  state () {
    return {
      token: getToken() || '',
      password: '123456',
      nickname: '小明',
      avatar: 'img'
    }
  },
  mutations: {
    setUserToken (state, payload) {
      state.token = payload
      setToken(payload)
    },
    getUserinfo (state, payload) {
      state.password = payload
    },
    getNickname (state, payload) {
      state.nickname = payload
    },
    getAvatar (state, payload) {
      state.avatar = payload
    }
  },
  actions: {}
}
